#include "base.h"

#include "bit_file.h"
#include "abc_file.h"

#include <zlib.h>

uint var_len_uint_read(FILE * fp, int byte_len) {
	return 0;
}

int var_len_int_read(FILE * fp, int byte_len) {
	return 0;
}

uint fixed_len_uint_read(FILE * fp, int byte_len) {
	return 0;
}

int fixed_len_int_read(FILE * fp, int byte_len) {
	return 0;
}

void abc_file_init(abc_file * af, bit_file * bf) {
	swf_head_signature s;
	swf_head_frame f;
	bit_file nbf;
	int error;
	int uncomprlen;

	bit_file_read(bf, sizeof(s), (void*)&s);

	nbf.bytes = malloc(s.file_length);
	/// uncompress
	error = uncompress(nbf.bytes, &uncomprlen, bf->bytes + 8, bf->len - 8);
	nbf.len = uncomprlen;
	nbf.off = 0;
}


